import React from 'react';
import {observer, inject} from 'mobx-react';

import {Button} from 'amis';

import {IMainStore} from '../../store';
import {Link} from "react-router-dom";

export default inject('store')(
    observer(function ({store}: { store: IMainStore }) {

        return (
            <div>
                <div className={`a-Layout-headerBar`}>
                    <div className="hidden-xs p-t-sm pull-right px-2">

                        <Button
                            size="sm"
                            level="info"
                            className="m-r-xs"
                            onClick={() => store.pageManageStore.addPageShow(true)}
                        >
                            新增子页面
                        </Button>
                        <Link to={'/index'}>
                            <Button size="sm" className="m-r-xs" level="info">
                                返回首页
                            </Button>
                        </Link>
                    </div>
                </div>
            </div>
        );
    })
);